package com.learn.spring.test;

import com.learn.spring.service.TransactionService;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

//@ExtendWith(SpringExtension.class)  // spring 引入JUnit5版本测试
//@ContextConfiguration("classpath:beans8.xml") // 加载配置文件
@SpringJUnitConfig(locations = {"classpath:beans8.xml"}) // 复合注解，包含了上面两个注解的意思
public class Case9 {
    /**
     * 5、Spring5 支持整合了 JUnit5
     *  (2) 整合 JUnit5
     *      引入 JUnit5 包
     *
     */

    @Autowired
    private TransactionService service;

    @Test
    public void test1() {
        service.accountMoneyTransactionXml();
    }

}
